﻿using CTP.CRM.Repository.Demo.Entitys;
using CTP.CRM.Repository.Demo.ValueObjects;

namespace CTP.CRM.Repository.Demo.Services
{
    public interface IDemoRepository
    {
        Task<bool> EntityRelationSave(DemoEntity entity);
        Task<int> InsertReturnIdentityAsync(DemoEntity entity);
        Task<bool> UpdateAsync(DemoEntity entity);
        Task<bool> DeleteAsync(DemoEntity entity);
        Task<DemoEntity> MyGetByIdAsync(int id);
        Task<UnifyPageResultDto<DemoEntity>> GetListByPage(int pageSize, int pageindex, string name);
        Task<UnifyPageResultDto<DemoValueObject>> OriginalSql(DemoValueObject obj);
        Task<List<DemoEntity>> InputToValueObject(DemoValueObject obj);
        Task Transaction();
        Task MultipleMethodTrans1();
        Task MultipleMethodTrans2();
        Task InternalTrans();
        Task UpdatePartColumns(DemoEntity entity);

        Task<DemoEntity> GetDataCache(int Id);
    }
}